package java_0325_toString;

public class toString {
    public static void main(String[] args) {
        A jack = new A("jack", "cook");
        System.out.println(jack);

    }
}

class A {
    public A(String name, String job) {
        this.name = name;
        this.job = job;
    }

    private String name;
    private String job;

    /*
    快速重写toString
    alt+insert->toString
     */
    @Override
    public String toString() {
        return "A{" +
                "name='" + name + '\'' +
                ", job='" + job + '\'' +
                '}';
    }
}

